package com.wanxi.web.service.product.impl;


import com.wanxi.product.service.api.feign.ProductAdminService;
import com.wanxi.product.service.api.feign.ProductAdminService;
import com.wanxi.product.service.api.query.admin.SkuQuery;
import com.wanxi.product.service.api.query.admin.TagQuery;
import com.wanxi.product.service.api.query.admin.TypeQuery;
import com.wanxi.product.service.api.result.CommonResult;
import com.wanxi.product.service.api.vo.admin.SkuUpdateInVo;
import com.wanxi.product.service.api.vo.admin.TagAddInVo;
import com.wanxi.product.service.api.vo.admin.TypeAddInVo;
import com.wanxi.product.service.api.vo.admin.TypeUpdateInVo;
import com.wanxi.web.service.product.ProductAdminWebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: ProductAdminWebService
 * Description:
 * date: 2022/1/13 16:43
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
@Service
public class ProductAdminWebServiceImpl implements ProductAdminWebService {

    @Autowired
    private ProductAdminService productAdminService;

    @Override
    public CommonResult<Long> adminAddType(TypeAddInVo typeAddInVo) {
        return productAdminService.addType(typeAddInVo);
    }

    @Override
    public CommonResult adminFindAllType(TypeQuery typeQuery) {
        return productAdminService.findAllType(typeQuery);
    }

    @Override
    public CommonResult adminFindTypeById(Long id) {
        return productAdminService.findTypeById(id);
    }

    @Override
    public CommonResult adminUpdateType(TypeUpdateInVo typeUpdateInVo) {
        return productAdminService.updateType(typeUpdateInVo);
    }

    @Override
    public CommonResult adminDeleteType(Long id) {
        return productAdminService.deleteType(id);
    }

    @Override
    public CommonResult adminFindAllSku(SkuQuery skuQuery) {
        return productAdminService.findAllSku(skuQuery);
    }

    @Override
    public CommonResult adminUpdateSku(SkuUpdateInVo skuUpdateInVo) {
        return productAdminService.updateSku(skuUpdateInVo);
    }

    @Override
    public CommonResult adminDeleteSkuById(Long id) {
        return productAdminService.deleteSkuById(id);
    }

    @Override
    public CommonResult adminAddTag(TagAddInVo tagAddInVo) {
        return productAdminService.addTag(tagAddInVo);
    }

    @Override
    public CommonResult adminFindTagAll(TagQuery tagQuery) {
        return productAdminService.findTagAll(tagQuery);
    }

    @Override
    public CommonResult adminDeleteTagById(Long tagId) {
        return productAdminService.deleteTagById(tagId);
    }
}
